import instance from '../../utils/axios.js'

const toLogin = ({ mobile, code }) => {
    return instance({
        url: '/v1_0/authorizations',
        method: 'post',
        data: { mobile, code }
    })
}
export { toLogin }

import { getToken } from '../../utils/token.js'

const getUserInfo = () => {
    return instance({
        url: '/v1_0/user/profile',
        method: 'get',
        headers: { Authorization: `Bearer ${getToken().token}` }
    })
}

export { getUserInfo }